/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.modelo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author CARLOS
 */
public class ConexionMySQL {
    static String server = "jdbc:mysql://localhost:3306/mvc";
    static String login = "root";
    static String pass = "";
    
    public static Connection Conexion() throws SQLException {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            Connection mySqlConn = (Connection) DriverManager.getConnection(server,login,pass);
            return mySqlConn;
        } catch (ClassNotFoundException ex) {
            return null;
        }
    }
    
    
}
